package com.icart.entities;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class BiServitempriceEntityPK implements Serializable {
    private long servitemid;
    private long carkindid;

    @Column(name = "servitemid")
    @Id
    public long getServitemid() {
        return servitemid;
    }

    public void setServitemid(long servitemid) {
        this.servitemid = servitemid;
    }

    @Column(name = "carkindid")
    @Id
    public long getCarkindid() {
        return carkindid;
    }

    public void setCarkindid(long carkindid) {
        this.carkindid = carkindid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiServitempriceEntityPK that = (BiServitempriceEntityPK) o;

        if (servitemid != that.servitemid) return false;
        if (carkindid != that.carkindid) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (servitemid ^ (servitemid >>> 32));
        result = 31 * result + (int) (carkindid ^ (carkindid >>> 32));
        return result;
    }
}
